package com.zx.security.reactive.service;


import com.zx.security.common.model.LoginUser;
import org.springframework.security.oauth2.jwt.ReactiveJwtDecoder;
import reactor.core.publisher.Mono;

/**
 * <p>
 * description: token验证处理 <br>
 * create: 2024-08-20 13:30
 * </p>
 *
 * @author zhou  xun
 */

public interface ICustomTokenService {
    /**
     * 获取用户身份信息
     *
     * @param token 令牌
     * @return {@link Mono<LoginUser>}
     * @author zhou  xun
     * @since 2025-05-13
     */
    Mono<LoginUser> getLoginUser(String token);

    /**
     * 删除用户身份信息
     *
     * @param token 令牌
     * @return {@link Mono<Void>}
     * @author zhou  xun
     * @since 2025-05-13
     */
    Mono<Void> delLoginUser(String token);

    /**
     * 获取响应式JWT解码器
     *
     * @return {@link ReactiveJwtDecoder}
     */
    ReactiveJwtDecoder getReactiveJwtDecoder();
}